# configurations lstm with dropout
def get_config_cnn():
    config = {}

    # Dimension of the word embedding matrix
    config['word_nembed'] = 128
    config['pos_nembed'] = 32
    config['nterm_nembed'] = 32

    # Batch size of train data
    config['batch_size_train'] = 100

    # Batch size of valid data
    config['batch_size_dev'] = 100

    # Batch size of test data
    config['batch_size_test'] = 100

    # Root directory for dataset
    datadir = './data/'
    tooldir = '../tools/'

    # Module name of the stream that will be used
    config['stream'] = 'stream'

    # vocabularies
    config['word_table'] = datadir + 'word_atoi.pkl'
    config['pos_table'] = datadir + 'pos_atoi.pkl'
    config['op_table'] = datadir + 'op_atoi.pkl'

    config['nterm_table'] = datadir + 'nterm_atoi.pkl'

    config['op_itoa_table'] = datadir + 'op_itoa.pkl'
    config['kid2nt'] = datadir + 'kid2nt_rule.pkl'

    #init and trans
    config['init'] = datadir + 'init.pkl'
    config['trans'] = datadir + 'trans.pkl'

    config['eval'] = tooldir + 'evalb'

    # datasets
    config['bracket_ref'] = '../data/ctb8.bracket.test'

    config['word_train'] = datadir + 'word_feature.train'
    config['word_dev'] = datadir + 'word_feature.dev'
    config['word_test'] = datadir + 'word_feature.test'

    config['pos_train'] = datadir + 'pos_feature.train'
    config['pos_dev'] = datadir + 'pos_feature.dev'
    config['pos_test'] = datadir + 'pos_feature.test'

    config['op_train'] = datadir + 'op_label.train'
    config['op_dev'] = datadir + 'op_label.dev'
    config['op_test'] = datadir + 'op_label.test'

    config['nterm_train'] = datadir + 'nterm_feature.train'
    config['nterm_dev'] = datadir + 'nterm_feature.dev'
    config['nterm_test'] = datadir + 'nterm_feature.test'

    config['word_sent_test'] = datadir + 'word.test'
    config['word_sent_dev'] = datadir + 'word.dev'
    config['word_sent_train'] = datadir + 'word.train'

    config['pos_sent_test'] = datadir + 'pos.test'
    config['pos_sent_dev'] = datadir + 'pos.dev'
    config['pos_sent_train'] = datadir + 'pos.train'


    # vocabulary size
    config['word_size'] = 40000
    config['pos_size'] = 39
    config['op_size'] =  103
    config['nterm_size'] = 67

    # Special tokens and indexes
    config['unk_id'] = 0
    config['unk_token'] = '<UNK>'

    # This many batches will be read ahead and sorted
    config['sort_k_batches'] = 11

    # Maxmum number of updates
    config['finish_after'] = 2000

    config['dropout'] = 0

    config['saveto'] = 'train_parser.npz'

    config['nhids'] = 512

    config['reload'] = False
    #config['reload'] = True

    config['save_freq'] = 500

    return config
